package org.idea.spring.dependency.inject.type;

import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;

/**
 * @Author linhao
 * @Date created in 3:53 下午 2021/4/23
 */
public class ListObjectInjectDemo {

    public static void main(String[] args) {
        String xmlPath = "classpath:/META-INF/type-list-independency-inject.xml";
        DefaultListableBeanFactory defaultListableBeanFactory = new DefaultListableBeanFactory();
        XmlBeanDefinitionReader xmlBeanDefinitionReader = new XmlBeanDefinitionReader(defaultListableBeanFactory);
        xmlBeanDefinitionReader.loadBeanDefinitions(xmlPath);
        ListObject listObject = defaultListableBeanFactory.getBean(ListObject.class);
        System.out.println(listObject);
    }
}
